package org.opentcs.kcvehicle.communication.kc.udp.agv.param.function.b1;

import org.opentcs.kcvehicle.communication.kc.common.byteutils.ByteUtils;

public class SubscribeInfo {
  //站控协议命令码，2个字节
  public byte[] commandCode;
  //上报间隔时间 ,单位ms ，2个字节
  public byte[] intervalTime;
  //上报持续时间,单位ms ，4个字节
  public byte[] durationTime;
  //预留,8个字节
  public byte[] reserved;

  public SubscribeInfo(byte[] commandCode, Short intervalTime, Integer durationTime) {
    this.commandCode = commandCode;
    this.intervalTime = ByteUtils.shortToBytes(intervalTime);
    this.durationTime = ByteUtils.intToBytes(durationTime, 4);
    this.reserved = new byte[8];
  }
}
